import VueRouter from "vue-router";

//导入对应的路由组件
import HomeContainer from './components/tabbar/homeContainer.vue'
import MemberContainer from './components/tabbar/MemberContainer.vue'
import shopCarContainer from './components/tabbar/shopCarContainer.vue'
import searchContainer from './components/tabbar/searchContainer.vue'
import newsList from './components/news/NewsList.vue'
import newsInfo from './components/news/newsInfo.vue'

var router = new VueRouter({
    routes: [// 配置路由规则
        {path:'/',redirect:'/home'},
        {path : '/home', component:HomeContainer},
        {path : '/member', component:MemberContainer},
        {path : '/shopcar', component:shopCarContainer},
        {path : '/search', component:searchContainer},
        {path:'/home/newslist',component:newsList},
        {path:'/home/newsInfo/:id',component:newsInfo}

    ],
    linkActiveClass:'mui-active' //覆盖默认的路由高亮的类 默认的是link-active
})

//把路由对象暴露出去
export default router